#pragma once

#define WIN32_LEAN_AND_MEAN
#define DIRECTINPUT_VERSION 0x0800
#include <windows.h>
#include <dinput.h>
#include <string>

namespace Diol
{

class Common
{
public:
	static std::string	TCHARToUTF8( const TCHAR* tcharString );

	static bool			isXInputController( const GUID* pGuidProductFromDirectInput );

	static const char*	HRESULTToString( HRESULT hr );

private:
	static std::wstring	MBCStoUTF16String( const std::string& mbcsString );
	static std::string	UTF16toUTF8String( const std::wstring& utf16String );
	static std::wstring	UTF8toUTF16String( const std::string& utf8String );
};

}
